But WHY?
The question I'm sure is on everyone's minds (or maybe it isn't, I dunno, I'm not a mind reader) is WHY?  Well, I'll tell you, so listen up.
When I first "met" Cedric in Book III, I didn't really feel one way or another towards him.  Well, who really did?  He only appeared for that one Quidditch match and then (as far as I can recall) never again.  JK Rowling, I think, gives mention to a minor detail in one book and then brings it out as a main plot in the next (which is why I'm wary of the "triumphant" look on Dumbledore's face when Harry told him that Voldemort could touch him again).  In this case, the "minor detail(s)" were Cedric and Cho, I think (and possibly more, but I need to reread Book III again), to be mentioned once and brought out in greater detail in the next book.  Particularly Cedric, how he competed with Harry once in Book III and then Book IV was basically a repeat of the Quidditch match, on a larger scale, but with Cedric and Harry helping each other along the way.
They made a good team, really, and it seemed like they were always accompanying each other...somewhere.  The first example was when they left the Great Hall together after the champions were chosen.  It was weird how during the last task they worked together against Krum and then once Krum was out of the way they were rivals again.  You know, if Harry hadn't insisted on them both taking the cup, Cedric would have lived.  But you know what else?  I don't blame Harry.  How could he have known, after all?
When I saw Cedric again in the next book, with his father bragging all over the place about how he beat Harry, I liked him a little, but only because he tried to stop his father from making Harry feel bad (with futility).  After that, well, he didn't really do much for me.  I thought he was talented as a wizard, of course, because he is.  Although I disliked him a bit when Cho said she was going to the Yule Ball with him, because I wanted her for Harry.  But Cedric deserves her, I suppose...maybe not as much as Harry, but I think he deserved to go to the ball with her because he's basically a good guy.  And now that he's dead, maybe Harry will get Cho (or maybe Cho will be too upset to take another boyfriend right away).
Maybe that's why Rowling decided to kill him: because he's too perfect.  It seems like he's just good at everything, and kind, generous, self-sacrificing, AND modest!  Perfect characters tend to be boring, but Cedric's rivalry and at the same time partnership with Harry is what made him interesting.  Whatever Harry does, Cedric goes one better or just barely beats him to it (Cho, the Quidditch match, the tasks, and eventually the Cup).  He was a direct rival to Harry because they were both the Hogwarts champions, and maybe Rowling decided that there could only be one Hogwarts champion after all, and she obviously couldn't let Harry lose, and since it was a draw between him and Cedric guess who had to go?  And you know what, I really started to like him during the maze part, and then it turns out that he dies.  A shame, huh?  Which is why I have to reread the book now and pay special attention to Cedric, and reread the Quidditch scene of the third book too.  I was slightly depressed after I finished reading the book (and my choice of music reflected that, nonstop "Pilgrim" by Eric Clapton ^^;;) and when they came back from the graveyard and everyone saw Cedric dead I actually cried. :..(  And I don't usually cry easily either.
Although maybe I just sympathized with him because he died, you know?  Maybe if someone else had died, say...Fred and George, I would have liked them more too.  Or maybe not.  But whatever the reason, I felt I should pay tribute to this great character and not "insult his memory", instead let it live on honorably. (I better shut up now, I'm getting really cheesy. ^^;;;)